Skip to content

Remove globalrouter labs flag#778

Open
evanphx wants to merge 2 commits into
mainfrom
mir-1079-remove-globalrouter-labs-flag
Open

Remove globalrouter labs flag#778
evanphx wants to merge 2 commits into
mainfrom
mir-1079-remove-globalrouter-labs-flag

Conversation

@evanphx

@evanphx evanphx commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Graduates the global router from a labs feature to default behavior — it now starts automatically whenever the miren server has cloud auth configured.
  • Drops globalrouter from pkg/labs/features.yaml (regenerates labs.gen.go), removes the labs.GlobalRouter() gate in components/coordinate, and updates pkg/labs/labs_test.go to use routeoidc as the representative flag for the enable/disable/case/all-keyword tests.
  • Cleans up the blackbox cloud harness: renames restartServerWithGlobalRouterrestartServerWithRegistration (the restart still has to happen to load registration.json) and drops DEV_SERVER_FLAGS='--labs globalrouter'.
  • Adds docs/docs/miren-cloud/global-router.md describing how the feature works, when it runs, how it interacts with subdomains, and basic troubleshooting; links it from the Miren Cloud sidebar.

Notes for Reviewers

  • Any cluster currently starting with MIREN_LABS=globalrouter (or --labs globalrouter) will get a benign "unknown labs feature flag" warning at startup. No behavior change.
  • make lint passes; pkg/labs and pkg/globalrouter tests pass on the host. components/coordinate integration tests need the dev container's etcd/containerd and were not run locally.

Refs MIR-1079

Test plan

  • CI green (lint + unit tests)
  • Blackbox cloud test (make test-blackbox against the cloud harness) verifies the global router still connects without the labs flag
  • Manually start a registered cluster and confirm connected to cloud appears in logs

The global router has graduated from labs to default behavior — it now
starts automatically whenever the miren server has cloud auth configured.

- Drop the globalrouter entry from pkg/labs/features.yaml and regenerate
- Remove the labs.GlobalRouter() gate in components/coordinate
- Update labs_test.go to use routeoidc as the representative flag
- Drop --labs globalrouter from the blackbox cloud harness; rename
  restartServerWithGlobalRouter to restartServerWithRegistration since
  the restart still happens to load registration.json
- Add docs/miren-cloud/global-router.md describing the feature

Refs MIR-1079
@evanphx evanphx requested a review from a team as a code owner April 29, 2026 19:44
@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5bf1bbff-99f7-4f73-8f2d-be50670f53bd

📥 Commits

Reviewing files that changed from the base of the PR and between 8a310f9 and 4d72bf1.

📒 Files selected for processing (4)
  • components/coordinate/coordinate.go
  • docs/sidebars.ts
  • pkg/labs/features.yaml
  • pkg/labs/labs.gen.go
💤 Files with no reviewable changes (2)
  • pkg/labs/features.yaml
  • pkg/labs/labs.gen.go
✅ Files skipped from review due to trivial changes (1)
  • docs/sidebars.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/coordinate/coordinate.go

📝 Walkthrough

Walkthrough

This pull request removes the globalrouter feature flag from the labs framework and makes global router functionality an always-enabled component. The global router now activates automatically when cloud authentication is configured, rather than requiring the --labs globalrouter flag. Changes include updating the coordinator's initialization logic to check for cloud auth instead of lab flag state, removing feature definitions and generated code from the labs system, updating test references to use an alternative feature flag, and adding documentation that explains the global router's runtime behavior and configuration requirements.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/docs/miren-cloud/global-router.md`:
- Around line 39-41: The fenced code block in global-router.md lacks a language
identifier causing MD040; update the block fence from ``` to include a language
(e.g., use ```text or another appropriate language) so it becomes ```text and
ensure the inner line "component=globalrouter ... connected to cloud" remains
unchanged to satisfy linting and enable proper highlighting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 745afdf7-0c98-4368-93a1-d71b78ad81bc

📥 Commits

Reviewing files that changed from the base of the PR and between 583c130 and 8a310f9.

📒 Files selected for processing (7)
  • blackbox/harness/cloud.go
  • components/coordinate/coordinate.go
  • docs/docs/miren-cloud/global-router.md
  • docs/sidebars.ts
  • pkg/labs/features.yaml
  • pkg/labs/labs.gen.go
  • pkg/labs/labs_test.go
💤 Files with no reviewable changes (2)
  • pkg/labs/features.yaml
  • pkg/labs/labs.gen.go

Comment on lines +39 to +41
```
component=globalrouter ... connected to cloud
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add language identifier to the code block.

The fenced code block should specify a language identifier for proper syntax highlighting and linting compliance.

📝 Proposed fix
-```
+```text
 component=globalrouter ... connected to cloud

</details>

As per coding guidelines: markdownlint flagged this as MD040 (fenced-code-language).

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 39-39: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/docs/miren-cloud/global-router.md` around lines 39 - 41, The fenced code
block in global-router.md lacks a language identifier causing MD040; update the
block fence from ``` to include a language (e.g., use ```text or another
appropriate language) so it becomes ```text and ensure the inner line
"component=globalrouter ... connected to cloud" remains unchanged to satisfy
linting and enable proper highlighting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant